package com.showgood.view.component {
	import flash.display.Graphics;
	import flash.display.Sprite;
	
	/**
	 * 三角形一个
	 * @author BianPeng
	 */
	public final class Triangle extends Sprite {
		
		public function Triangle(len:int, angle:int) {
			var g:Graphics = this.graphics;
			var half_angle:Number = Math.PI * angle / 360;
			g.beginFill(0x000000);
			g.moveTo(0, 0);
			g.lineTo(len * Math.cos(half_angle), len * Math.sin(half_angle));
			g.lineTo(len * Math.cos(half_angle), -len * Math.sin(half_angle));
			g.lineTo(0, 0);
			g.endFill();
		}
		
	}
}
